﻿using System;
using System.Windows;

using DotNetUI.Controls;
using DotNetUI.Models;

using Xc.DataAccess.Core;

namespace Xc.Logics.HyperTerminalCore.Udp.Models
{
    public enum Status
    {
        Success,
        Failed,
        Pending
    }
    /// <summary>
    /// 聊天信息
    /// </summary>
    public class ChatInfo : ViewModelBase, IChatLog
    {
        public ChatInfo() { }
        public ChatInfo(object content, HorizontalAlignment horizontalAlignment)
        {
            this.content = content;
            DateTime = DateTime.Now;
            Alignment = horizontalAlignment;
            Status = Xc.Logics.HyperTerminalCore.Udp.Models.Status.Success;
        }
        object status;
        public object Status
        {
            get => status;
            set
            {
                if (status == value)
                {
                    return;
                }

                status = value;
                RaisedPropertyChanged();
            }
        }
        object caption;
        public object Caption
        {
            get => caption;
            set
            {
                if (caption == value)
                {
                    return;
                }

                caption = value;
                RaisedPropertyChanged();
            }
        }
        object content;
        public object Content
        {
            get => content;
            set
            {
                if (content == value)
                {
                    return;
                }

                content = value;
                RaisedPropertyChanged();
            }
        }
        HorizontalAlignment alignment;
        public HorizontalAlignment Alignment
        {
            get => alignment;
            set
            {
                if (alignment == value)
                {
                    return;
                }

                alignment = value;
                RaisedPropertyChanged();
            }
        }
        DateTime dateTime;
        public DateTime DateTime
        {
            get => dateTime;
            set
            {
                if (dateTime == value)
                {
                    return;
                }

                dateTime = value;
                RaisedPropertyChanged();
            }
        }
        string respondMessage;
        public string RespondMessage
        {
            get => respondMessage;
            set
            {
                if (respondMessage == value)
                {
                    return;
                }

                respondMessage = value;
                RaisedPropertyChanged();
            }
        }
        ContentType contentType;
        private Langugage hightLight;

        public ContentType ContentType
        {
            get => contentType;
            set
            {
                if (contentType == value)
                {
                    return;
                }

                contentType = value;
                RaisedPropertyChanged();
            }
        }

        public Langugage HightLight
        {
            get => hightLight; set
            {
                hightLight = value;
            }
        }
    }
}
